<template>
  <!-- 运动 -->
  <section>
    <el-row style="padding:10px;">
      <el-col :span="6">
        <el-row>
          <span style="font-size: 20px;">日常锻炼</span>
        </el-row>
        <el-row style="margin-top:40px;">
          <img style="width:120px;" :src="widget.config.qrcode"/>
        </el-row>
      </el-col>
      <el-col :span="18" style="border:1px solid #666;line-height:26px;padding:10px;">
        <el-row style="font-weight: bold;border-bottom:1px solid #666">
          <el-col :span="18">动作</el-col>
          <el-col :span="6">扫码学习动作</el-col>
        </el-row>
        <el-row v-for="sport of widget.data.sport" :key="sport.id" style="border-bottom: 1px dashed #666;">
          <el-col :span="18">
            <div>{{sport.name}}</div>
            <div>作用：{{sport.effect}}</div>
          </el-col>
          <el-col :span="6"><section v-if="sport.data && sport.data.img"><img style="width:68px;" :src="sport.data.img" /></section></el-col>
        </el-row>
        <el-row>
          <div v-html="widget.config.description"></div>
        </el-row>
      </el-col>
    </el-row>
  </section>
</template>

<script>
  export default {
    name: "page-fangan-f",
    props: ['reportData','widget', 'showConfDialog'],
    data(){
      return {
        isDebug:true
      }
    },
    created(){
      if(Object.getOwnPropertyNames(this.widget.data).length < 2 || this.isDebug){
        this.widget.data.sport = this.reportData.data.sport
        this.$emit('done',this.widget.data)
      }
    }
  }
</script>

<style scoped>

</style>
